package com.ruoyi.iot.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Sensor {

    public interface Upload {
    }

    public interface Update {
    }

    @NotNull(groups = {Upload.class, Update.class}, message = "传感器ID不能为空")
    private String sensorId;

    @NotNull(groups = {Upload.class}, message = "矿山ID不能为空")
    private String mineId;

    @NotNull(groups = {Upload.class}, message = "传感器设备编号不能为空")
    private String sensorInterfaceId;

    @NotNull(groups = {Upload.class, Update.class}, message = "传感器名称不能为空")
    private String sensorName;

    @NotNull(groups = {Upload.class}, message = "传感器类型不能为空")
    private String sensorType;

    @NotNull(groups = {Upload.class}, message = "传感器经度不能为空")
    private Double latitude;

    @NotNull(groups = {Upload.class}, message = "传感器纬度不能为空")
    private Double longitude;

    @NotNull(groups = {Upload.class, Update.class}, message = "传感器高度不能为空")
    private Double height;

    @NotNull(groups = {Upload.class}, message = "传感器运行状态不能为空")
    private Integer runningState;

    @NotNull(groups = {Upload.class}, message = "epsg编码不能为空")
    private Integer epsgCode;

    private LocalDateTime createTime;
}
